package com.yy.permissions_general.module.system.roleAuth.mapper;

import com.yy.permissions_general.module.system.roleAuth.entity.RoleAuth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yy.permissions_general.module.system.roleAuth.vo.RoleAuthVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色权限关联 Mapper 接口
 * </p>
 *
 * @author YY
 * @since 2021-10-07
 */
public interface RoleAuthMapper extends BaseMapper<RoleAuth> {

    /**
    * 分页查询
    * @param pageContext
    * @param roleAuth
    * @return
    */
    Page<RoleAuth> selectPage(@Param("page")Page pageContext, @Param("roleAuth")RoleAuth roleAuth);

    /**
     * 根据角色ID获取权限
     * @param roleId 角色ID
     * @return
     */
    List<RoleAuthVo> getRoleAuthTree(@Param("roleId") Integer roleId);
}

